package com.lian.anlimall.coupon.feign;


import com.lian.anlimall.coupon.vo.WareSkuEntity;
import com.lian.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @Description:
 * @Created: with IntelliJ IDEA.
 * @author: 03 16:46
 **/

@FeignClient("anlimall-ware")
public interface WmsFeignService {

    /**
     * 查询sku是否有库存
     * @return
     */
    @PostMapping(value = "/ware/waresku/hasStock")
    R getSkuHasStock(@RequestBody List<Long> skuIds);


    /**
     * 查询运费和收货地址信息
     * @param addrId
     * @return
     */
    @GetMapping(value = "/ware/wareinfo/fare")
    R getFare(@RequestParam("addrId") Long addrId);

    @RequestMapping("/ware/waresku/infoBySkuId2")
    //@RequiresPermissions("ware:waresku:info")
    WareSkuEntity infoBySkuId2(@RequestParam("skuId") Long skuId);

}
